package review;

/**
 * @author oldliu
 * @since 1.0
 */
public class Break2 {
    public static void main(String[] args) {
        //跳出多层
        //1-10，内层 10，20.。。乘积的和超过10000，退出
        //求内层和外层的当前值
        int i = 1;
        int j = 10;
        int sum = 0;
        suanhe://标记
        for (i = 1; i <= 10; i++) {
            System.out.println("算到了" + i);
            for (j = 10; j <= 40; j++) {
                sum += i * j;
                if (sum > 10000) {
                    System.out.println("找到了");
                    // System.out.println("超过10000的i和j是："+i+","+j);
                    //return
                    break suanhe;
                }
            }
        }
        System.out.println("超过10000的i和j是：" + i + "," + j);
    }
}
